package systempen.cmanager;

import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;

public class ThemePicker {
	private static int sTheme;

	public final static int DARK = 0;
	public final static int LIGHT = 1;
	public final static int SKY = 2;


	public static void changeToTheme(int theme,Activity activity)
	{
		sTheme = theme;
		AppPreferences ap=new AppPreferences(activity);
		ap.setTheme(sTheme);
	}

	public static void onActivityCreateSetTheme(Activity activity)
	{
		
		AppPreferences ap=new AppPreferences(activity);
		switch (ap.getTheme())
		{
		default:
		case DARK:
			activity.setTheme(R.style.Theme_Dark);
			break;
		case LIGHT:
			activity.setTheme(R.style.Theme_Light);
			break;
		case SKY:
			activity.setTheme(R.style.Theme_Sky);
			break;
		}
	}
}
